﻿using System.Collections;
using System.Windows.Forms;

namespace SQLDiagConfiguration
{
    /// <summary>
    /// This class implements the collection of Profiler Events
    /// and is used to display them on the SQL Profiler Pane TreeView
    /// </summary>
    class ProfilerEventTypeObject
    {
        #region Properties
        private int eventClassID;

        public int EventClassID
        {
            get { return eventClassID; }
            set { eventClassID = value; }
        }
        private string eventTypeName;

        public string EventTypeName
        {
            get { return eventTypeName; }
            set { eventTypeName = value; }
        }

        private bool hasEnabledAtClassLevel;

        public bool HasEnabledAtClassLevel
        {
            get { return hasEnabledAtClassLevel; }
            set { hasEnabledAtClassLevel = value; }
        }

        private SortedList children;

        public SortedList Children
        {
            get { return children; }
            set { children = value; }
        }
        private TreeNode node;

        public TreeNode Node
        {
            get { return node; }
            set { node = value; }
        }

        #endregion Properties

        public ProfilerEventTypeObject(string eventType,bool hasEnabled)
        {
            EventTypeName = eventType;
            HasEnabledAtClassLevel = hasEnabled;
            Node = node;
            children = new SortedList();
        }
        public void Reset()
        {
            Children.Clear();
        }
    }
 
}
